package com.jzy.stock.warehouse.mapper;

import com.jzy.stock.warehouse.model.ListVo;
import com.jzy.stock.warehouse.model.SelectVo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by JZZK on 2022/7/11.
 */
@Mapper
public interface WareHouseMapper {
    List<ListVo> queryPage(SelectVo selectVo);

    int queryCount(SelectVo selectVo);

    @Select("select * from kuqushuxing where id=#{id}")
    ListVo queryById(Integer id);

    @Update("update kuqushuxing set status=#{status},updateName=#{updateName},updateTime=#{updateTime} where id =#{id}")
    void updateStatus(ListVo listVo1);

    @Select("select * from kuqushuxing where code=#{code}")
    ListVo queryByCode(String code);

    @Select("select * from kuqushuxing where name=#{name}")
    ListVo queryByName(String name);

    @Insert("insert into kuqushuxing(name,code,remark,status,createTime,createName,updateTime,updateName) values(#{name},#{code},#{remark},#{status},#{createTime},#{createName},#{updateTime},#{updateName})")
    void addVo(ListVo subClassVo3);

    @Update("update kuqushuxing set name=#{name},remark=#{remark},updateTime=#{updateTime},updateName=#{updateName} where id=#{id}")
    void update(ListVo listVo2);
}
